﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// MD5 加密
/// </summary>
public class MD5
{
	public MD5()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    public static string String2MD5(string key)
    {
        return FormsAuthentication.HashPasswordForStoringInConfigFile(key, "md5").Substring(8, 16).ToLower();
    }
}
